package com.yueqian.sign;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;
import android.widget.TextView;

import com.yueqian.sign.model.Student;

import java.util.ArrayList;
import java.util.List;

public class SignView extends BaseView{
    private ListView lv_sign;
    private List<Student> list;
    private StudentAdapter studentAdapter;
    //private MyAdapter<Student> adapter;

    public SignView(Context context){
        super(context);
        setContentView(R.layout.view_sign);

        initUI();
        initData();
    }

    public void initUI() {
        lv_sign = findViewById(R.id.lv_sign);
    }

    public void initData() {
        list = new ArrayList<>();
        list.add(new Student(1, "000001", "haha"));
        list.add(new Student(2, "000002", "hehe"));
        studentAdapter = new StudentAdapter(context, list);
        //adapter = new MyAdapter<Student>(context, list);
        lv_sign.setAdapter(studentAdapter);
    }

}
